﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;

namespace BLL
{
  public  class EmailBLL
    {
        EmailDAL dal = new EmailDAL();
        /// <summary>
        /// 加入
        /// </summary>
        /// <returns></returns>
        public List<Email> ShowEmail()
        {
            return dal.ShowEmail();

        }
        /// <summary>
        /// 删除信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteEmail(int id)
        {
            return dal.DeleteEmail(id);
        }
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public int Email_Add(Model.Email p)
        {
            return dal.Email_Add(p);
        }
        /// <summary>
        /// 显示详细信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Email ShowEmailX(int id)
        {
            return dal.ShowEmailX(id);
        }
        /// <summary>
        /// 修改信息
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public int UpdateEmail(Email data)
        {
            return dal.UpdateEmail(data);
        }
        /// <summary>
        /// 搜索
        /// </summary>
        /// <param name="pp"></param>
        /// <returns></returns>
        public List<Email> SeleteEmail(string name)
        {
            return dal.SeleteEmail(name);
        }
    }
}
